home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG PD-ROM BV3
/
BMUG PD-ROM Version BV3 (CDRM1097900).iso
/
HyperCard
/
Business
/
ScheduleStack
/
LocalStack
/
LocalStack
/
card_5204.txt
< prev
next >
Wrap
Text File
|
1990-01-07
|
5KB
|
216 lines
-- card: 5204 from stack: in
-- bmap block id: 7997
-- flags: 0000
-- background id: 3073
-- name: Cleanup
----- HyperTalk script -----
on openCard
global OneDay
put the date into Today
convert Today to seconds
put 30 * OneDay into OneMonth
convert (Today - OneMonth) to long date
put it into cd field KillDate
end openCard
-- part 1 (button)
-- low flags: 00
-- high flags: A006
-- rect: left=79 top=62 right=108 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Remove
----- HyperTalk script -----
on mouseUp
set the hilite of cd button "Save in stack" to false
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A006
-- rect: left=79 top=127 right=173 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Save in stack
----- HyperTalk script -----
on mouseUp
set the hilite of button "Remove" to true
if the hilite of me is true then
set lockText of cd field "Destination" to false
else set lockText of cd field "Destination" to true
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: E006
-- rect: left=79 top=192 right=238 bottom=248
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compact Stack
-- part 4 (field)
-- low flags: 00
-- high flags: 0004
-- rect: left=130 top=97 right=118 bottom=361
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: KillDate
-- part 5 (field)
-- low flags: 01
-- high flags: 0004
-- rect: left=130 top=160 right=181 bottom=361
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Destination
-- part 6 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=100 top=257 right=279 bottom=200
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OK
----- HyperTalk script -----
on mouseUp
push card
put the short name of this stack into ThisStack
put empty into cd field ToRemove
if the hilite of button Remove is true then
set lockscreen to true
-- if cards are being archived, check that the destination exists
if the hilite of cd button "Save in Stack" is true then
put cd field "Destination" into Destination
if Destination is empty then
answer "Need to know where to save them!"
exit mouseUp
end if
go stack Destination
if the result is not empty then
answer "Need to create the stack"
exit mouseUp
end if
go back
end if
set the cursor to busy
if the hilite of cd button "Save in stack" is true
then put TRUE into Save
else put FALSE into Save
put cd field "KillDate" into KillDate
convert KillDate to seconds
-- collect the ids of the cards to be removed
repeat with i = 1 to the number of cards
go card i
put the short name of this card into ThisCard
convert ThisCard to seconds
if the result is empty then
if ThisCard < KillDate then
put the number of lines of cd field ToRemove of cd CleanUp into LastLine
put the short id of this cd into line (LastLine + 1) of cd field ToRemove of cd CleanUp
end if
end if
end repeat
go card CleanUp
-- now remove the cards
put the number of lines of cd field ToRemove into NumCardsToRemove
repeat with i = 1 to NumCardsToRemove
go card CleanUp of stack ThisStack
go card id (line i of cd field ToRemove)
domenu "Cut Card"
if Save is TRUE then
go stack Destination
domenu "Paste Card"
go back
end if
end repeat
end if
go card CleanUp of stack ThisStack
if the hilite of button "Compact Stack" is true then
set the cursor to busy
domenu "Compact Stack"
end if
play sax temp 50 "a g "
answer "All Done!"
visual effect iris close
pop card
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=290 top=257 right=279 bottom=390
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Cancel
----- HyperTalk script -----
on mouseUp
visual effect iris close
go back
end mouseUp
-- part 8 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=392 top=26 right=306 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: ToRemove
-- part contents for card part 4
----- text -----
Friday, December 8, 1989